import { createRouter, createWebHistory } from 'vue-router'
import DishList from '../views/DishList.vue'
import OrderList from '../views/OrderList.vue'
import Ordering from '../views/Ordering.vue'

// Define routes
const routes = [
  {
    path: '/',
    redirect: '/ordering'
  },
  {
    path: '/dishes',
    name: 'DishList',
    component: DishList
  },
  {
    path: '/orders',
    name: 'OrderList',
    component: OrderList
  },
  {
    path: '/ordering',
    name: 'Ordering',
    component: Ordering
  }
]

// Create router instance
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 